package co.fitstart.weapp.api.dao;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;

import co.fitstart.entity.course.Course;
import co.fitstart.entity.courseware.fitnessgroup.FitnessGroup;
import co.fitstart.entity.courseware.fitnessgroup.FitnessGroupType;

/**
 * 
 * @author hayan_xiao
 *
 */
@Dao("hibernate")
public interface FitnessGroupDao {

    /**
     * 
     * @param course
     * @return
     */
    @Query("FROM FitnessGroup WHERE disabled = false AND course = :course")
    public List<FitnessGroup> list(@Variable("course") Course course);

    /**
     * 
     * @param type
     * @return
     */
    @Query("FROM FitnessGroup WHERE disabled = false AND type = :type")
    public List<FitnessGroup> list(@Variable("type") FitnessGroupType type);
}
